package io.gitee.zhangbinhub.acp.cloud.server.helloworld.scheduler;

import io.gitee.zhangbinhub.acp.boot.base.BaseSpringBootScheduledAsyncTask;
import io.gitee.zhangbinhub.acp.boot.log.LogAdapter;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.springframework.stereotype.Component;

@Component("testSchedulerTask")
public class TestSchedulerTask extends BaseSpringBootScheduledAsyncTask {
    private final LogAdapter log;

    public TestSchedulerTask(LogAdapter log) {
        this.log = log;
    }

    @Override
    public boolean beforeExecuteFun() {
        return true;
    }

    @Nullable
    @Override
    public Object executeFun() {
        log.info("执行定时任务：testSchedulerTask");
        return true;
    }

    @Override
    public void afterExecuteFun(@NotNull Object result) {

    }
}
